package mylab.starters.uuid.model.impl;

import cn.hutool.core.date.DateUtil;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import mylab.starters.uuid.model.BusinessName;
import mylab.utils.common.StrUtil;

/**
 * <p>
 * 日期业务名称
 * </p>
 *
 * @date Created in 2019/10/29 16:26
 */
@NoArgsConstructor
@AllArgsConstructor
public class DateBusinessName implements BusinessName {
    /**
     * 业务名称
     */
    private String businessName;

    /**
     * 业务名称
     *
     * @return 业务名称
     */
    @Override
    public String get() {
        if (StrUtil.isBlank(businessName)) {
            this.businessName = StrUtil.EMPTY;
        }
        return this.businessName + DateUtil.today();
    }
}
